package com.wei.tang.ui.me;

import com.wei.tang.AppContext;
import com.wei.tang.R;
import com.wei.tang.base.BaseActivity;
import com.wei.tang.bean.UserBean;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import butterknife.InjectView;
import butterknife.OnClick;

public class MyInformationActivity extends BaseActivity {
	private MyInformationActivity mySelf = this;

	@InjectView(R.id.rl_my_info_head)
	RelativeLayout rl_my_info_head;
	@InjectView(R.id.iv_my_info_head)
	ImageView iv_my_info_head;

	@InjectView(R.id.rl_my_info_name)
	RelativeLayout rl_my_info_name;
	@InjectView(R.id.tv_my_info_name)
	TextView tv_my_info_name;

	@InjectView(R.id.rl_my_info_sex)
	RelativeLayout rl_my_info_sex;
	@InjectView(R.id.tv_my_info_sex)
	TextView tv_my_info_sex;

	@InjectView(R.id.rl_my_info_birth)
	RelativeLayout rl_my_info_birth;
	@InjectView(R.id.tv_my_info_birth)
	TextView tv_my_info_birth;

	@InjectView(R.id.rl_my_info_phone)
	RelativeLayout rl_my_info_phone;
	@InjectView(R.id.tv_my_info_phone)
	TextView tv_my_info_phone;

	// 用户信息
	private UserBean userBean = AppContext.getInstance().getUserBean();;

	@Override
	public int getLayoutId() {
		return R.layout.my_information_activity;
	}

	@Override
	public void initView() {
//		iv_my_info_head.setImageBitmap();
		tv_my_info_name.setText(userBean.getUser_name());
		if (userBean.getUser_sex().equals("m")) {
			tv_my_info_sex.setText("男");
		}else{
			tv_my_info_sex.setText("女");
		}
		
	}

	@Override
	protected int getActionBarTitle() {
		return R.string.my_info_activity;
	}

	@Override
	@OnClick({ R.id.rl_my_info_head, R.id.rl_my_info_name, R.id.rl_my_info_sex, R.id.rl_my_info_birth,
			R.id.rl_my_info_phone })
	public void onClick(View v) {
		Intent intent = null;
		Bundle bundle = null;
		int id = v.getId();
		switch (id) {
		case R.id.rl_my_info_head:
			break;
		case R.id.rl_my_info_name:
			intent = new Intent(mySelf, MyInformationNameActivity.class);
			startActivity(intent);
			break;
		case R.id.rl_my_info_sex:
			break;
		case R.id.rl_my_info_birth:
			break;
		case R.id.rl_my_info_phone:
			break;
		}
	}

	@Override
	public void initData() {
	}
}
